﻿
package com.sc.services;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

import com.sc.servicesexample.R;


public class MainActivity extends Activity
{
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}
	
	// 通过定时服务，在锁屏、解屏时展示广告
	public void startService(View v)
	{
		Tool.startService(this);
		// ScreenService.start(this);
		// ScreenReceiver.register(this);
	}
	
	// 通过定时服务，在锁屏、解屏时展示广告
	public void stopService(View v)
	{
		Tool.stopService();
		// ScreenService.stop();
		// ScreenReceiver.unRegister();
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu)
	{
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
	
}
